//-------------------------------------------------------------------------------------------------
// <copyright file="SA1101.cs" company="OfficeClip LLC">
// Copyright (c) OfficeClip LLC.  All rights reserved.
// </copyright>
//-------------------------------------------------------------------------------------------------

namespace OfficeClip.OpenSource.StyleFix.Drivers
{
    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Text.RegularExpressions;

    public class SA1121
    {
        public static string Run(string input, SAObject saob)
        {
			string output = input;
			if (saob.Description.IndexOf("'array'") > -1)
			{
				output = input.Replace("System.Array", "array").Replace("Array", "array");
			}
			if (saob.Description.IndexOf("'bool'") > -1)
			{
				output = input.Replace("System.Boolean", "bool").Replace("Boolean", "bool");
			}
			if (saob.Description.IndexOf("'byte'") > -1)
			{
				output = input.Replace("System.Byte", "byte").Replace("Byte", "byte");
			}
			if (saob.Description.IndexOf("'char'") > -1)
			{
				output = input.Replace("System.Char", "char").Replace("Char", "char");
			}
			if (saob.Description.IndexOf("'decimal'") > -1)
			{
				output = input.Replace("System.Decimal", "decimal").Replace("Decimal", "decimal");
			}
			if (saob.Description.IndexOf("'double'") > -1)
			{
				output = input.Replace("System.Double", "double").Replace("Double", "double");
			}
			if (saob.Description.IndexOf("'short'") > -1)
			{
				output = input.Replace("System.Int16", "short").Replace("Int16", "short");
			}
			if (saob.Description.IndexOf("'int'") > -1)
			{
				output = input.Replace("System.Int32", "int").Replace("Int32", "int");
			}
			if (saob.Description.IndexOf("'long'") > -1)
			{
				output = input.Replace("System.Int64", "long").Replace("Int64", "long");
			}
			if (saob.Description.IndexOf("'object'") > -1)
			{
				output = input.Replace("System.Object", "object").Replace("Object", "object");
			}
			if (saob.Description.IndexOf("'sbyte'") > -1)
			{
				output = input.Replace("System.Sbyte", "sbyte").Replace("Sbyte", "sbyte");
			}
			if (saob.Description.IndexOf("'single'") > -1)
			{
				output = input.Replace("System.Single", "single").Replace("Single", "single");
			}
			if (saob.Description.IndexOf("'string'") > -1)
			{
				output = input.Replace("System.String", "string").Replace("String", "string");
			}
			if (saob.Description.IndexOf("'ushort'") > -1)
			{
				output = input.Replace("System.Ushort", "ushort").Replace("Ushort", "ushort");
			}
			if (saob.Description.IndexOf("'uint'") > -1)
			{
				output = input.Replace("System.Uint", "uint").Replace("Uint", "uint");
			}
			if (saob.Description.IndexOf("'ulong'") > -1)
			{
				output = input.Replace("System.Ulong", "ulong").Replace("Ulong", "ulong");
			}
			return output;
        }
    }
}
